import React from 'react';
import './App.css';
import { RecoilRoot } from 'recoil';
import {TodoList} from './components/Todo/TodoList';
import ErrorBoundary from './components/ErrorBoundary/ErrorBoundary';

function App() {
  return (
    <RecoilRoot>
      <ErrorBoundary>
        <React.Suspense fallback={<div>Loading...</div>}>
          <div className="App">
            <TodoList />
          </div>
          </React.Suspense>
      </ErrorBoundary>
    </RecoilRoot>
  );
}

export default App;
